package org.apache.dolphinscheduler.api.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import org.apache.dolphinscheduler.api.utils.ExcelDictConvert;
import org.apache.dolphinscheduler.api.utils.ExcelDictFormat;

import java.math.BigDecimal;
import java.util.Date;

public class BillExportVo {

    private static final long serialVersionUID = 1L;

    /**
     * 交易编号
     */
    @ExcelProperty(value = "交易编号", order = 1)
    private String billNo;

    /**
     * 收支类型 0 = 支出 1 = 收入
     */
    @ExcelProperty(value = "收支类型", converter = ExcelDictConvert.class, order = 3)
    @ExcelDictFormat(readConverterExp = "0=支出,1=收入")
    private Integer billType;

    /**
     * 交易类型 0 = 消费 1 = 平台服务
     */
    @ExcelProperty(value = "交易类型", converter = ExcelDictConvert.class, order = 4)
    @ExcelDictFormat(readConverterExp = "0=消费,1=平台服务,2=充值")
    private Integer tradeType;

    /**
     * 交易渠道0 = 账户余额 1 = 平台充值
     */
    @ExcelProperty(value = "交易渠道", converter = ExcelDictConvert.class, order = 5)
    @ExcelDictFormat(readConverterExp = "0=账户余额,1=平台充值")
    private Integer tradeChannel;

    /**
     * 交易金额
     */
    @ExcelProperty(value = "交易金额", order = 6)
    private BigDecimal billNumber;

    /**
     * 关联订单编号
     */
    @ExcelProperty(value = "关联信息", order = 8)
    private String orderNo;

    /**
     * 交易时间
     */
    @ExcelProperty(value = "交易时间", order = 7)
    @ColumnWidth(25)
    private Date createTime;

    /**
     * 账户名称
     */
    @ExcelProperty(value = "交易账号", order = 2)
    private String userName;

    /**
     * 余额
     */
    @ExcelProperty(value = "余额", order = 9)
    private BigDecimal balance;

    public BillExportVo() {
    }

    public String getBillNo() {
        return billNo;
    }

    public void setBillNo(String billNo) {
        this.billNo = billNo;
    }

    public Integer getBillType() {
        return billType;
    }

    public void setBillType(Integer billType) {
        this.billType = billType;
    }

    public Integer getTradeType() {
        return tradeType;
    }

    public void setTradeType(Integer tradeType) {
        this.tradeType = tradeType;
    }

    public BigDecimal getBillNumber() {
        return billNumber;
    }

    public void setBillNumber(BigDecimal billNumber) {
        this.billNumber = billNumber;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getTradeChannel() {
        return tradeChannel;
    }

    public void setTradeChannel(Integer tradeChannel) {
        this.tradeChannel = tradeChannel;
    }

    public BigDecimal getBalance() {
        return balance;
    }

    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }
}
